package com.whitedust;

import java. util.*;
public class Solution {
    public static class ListNode{
        int val;
        ListNode next;
        ListNode(){};
        ListNode(int val) { this.val = val; }
        ListNode(int val,ListNode next){
            this.val=val;
            this.next=next;
        }
    }

    //方法实现
    public static ListNode reverseBetween(ListNode head, int left, int right) {
        return null;
    }


    public static void main(String[] args){
//输入创建链表
        Scanner sc=new Scanner(System.in);
        int left=sc.nextInt();
        int right=sc.nextInt();
        ListNode head=new ListNode(sc.nextInt());
        ListNode p=head;
        while(sc.hasNextInt()){
            ListNode node=new ListNode(sc.nextInt());
            p.next=node;
            p=node;
        }
        sc.close();
//调用方法
        ListNode result=reverseBetween(head,left,right);
        p=result;
//输出结果
        while(p!=null){
            System.out.print(p.val+" ");
            p=p.next;
        }
    }


}